Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix storage range issue during snapsync #7624

Merged
merged 6 commits into from
Oct 2, 2024

Conversation

matkt
Copy link
Contributor

@matkt matkt commented Sep 16, 2024

PR description

Besu currently has a problem where, if it receives all storage slots at once without an accompanying proof, it correctly sets the end of the range to 0xFFF...FFFF. However, if all storage and a proof are received simultaneously, the logic mistakenly treats the end of the range as the last slot received rather than the expected end of the range. This discrepancy results in incomplete persistence of storage trie nodes.

Fixed Issue(s)

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests

Signed-off-by: Karim Taam <[email protected]>
@siladu
Copy link
Contributor

siladu commented Sep 26, 2024

Not sure how feasible it would be but would love to get an automated test around this. I think it should go in the next release regardless as it has passed a lot of manual sync testing #7620 (comment) so is a clear improvement

@matkt
Copy link
Contributor Author

matkt commented Sep 30, 2024

added a new tests and also modified the AccountHealingTrackingTest class in order to verify and match the new behavior

@matkt matkt marked this pull request as ready for review September 30, 2024 08:41
@matkt matkt requested a review from siladu September 30, 2024 08:42
Copy link
Contributor

@siladu siladu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@siladu
Copy link
Contributor

siladu commented Oct 2, 2024

@matkt worth a changelog?

@matkt
Copy link
Contributor Author

matkt commented Oct 2, 2024

@matkt worth a changelog?

don't think it is needed for this one

@matkt matkt enabled auto-merge (squash) October 2, 2024 07:49
@matkt matkt merged commit 9310e10 into hyperledger:main Oct 2, 2024
43 checks passed
2fehee added a commit to 2fehee/besu that referenced this pull request Oct 4, 2024
Signed-off-by: Karim Taam <[email protected]>
Co-authored-by: Simon Dudley <[email protected]>Signed-off-by: Chulhee lee <[email protected]>
@matkt matkt deleted the feature/fix-snapsync branch October 16, 2024 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants